﻿

using Framework.EncryptionDecryptionService.Enums;
using Framework.EncryptionDecryptionService.Models;

namespace Framework.EncryptionDecryptionService.Inteface
{
    /// <summary>
    /// 加解密服务
    /// </summary>
    public interface IEncryptionService
    {
        /// <summary>
        /// 加密
        /// </summary>
        /// <param name="data">待加密字符串</param>
        /// <returns>加密byte数组</returns>
        public byte[] Encrypt(string data);

        /// <summary>
        /// 加密
        /// </summary>
        /// <typeparam name="T">待加密对象类型</typeparam>
        /// <param name="data">待加密对象</param>
        /// <returns>加密字符串</returns>
        public string Encrypt<T>(T data) where T : class, new();

        /// <summary>
        /// 获取公钥 or 向量
        /// </summary>
        public SecretKeyModel GetSecretKey { get; }
    }
}
